Field of the Invention
The present invention relates to an image encoding apparatus, an image encoding method, and an image capture apparatus.
Description of the Related Art
Currently, a digital appliance that can record a moving image such as a digital video camera and a hard disk recorder is widely available. Such digital appliance performs compression encoding of moving image data in order to efficiently record a moving image in a recording medium such as a flash memory and a hard disk.
H.264 coding scheme is a typical example of moving image compression coding schemes. The H.264 coding scheme is a widely used moving image compression coding scheme because it is employed in AVCHD, which is a high definition recording scheme for video cameras, and is also employed in one-segment terrestrial digital broadcasting. AVCHD is the abbreviation of Advanced Video Codec High Definition.
In recent years, 4K television sets are introduced in the market. With such a trend toward higher definition moving images and higher frame rate, demand is increasing for further improvement in the compression efficiency of a moving image.
HEVC (High Efficiency Video Coding) coding scheme, which is a successor to the H.264 coding scheme and is a more highly efficient moving image compression coding scheme, has been designated as an international standard. The HEVC coding scheme is a moving image compression coding scheme that has a compression efficiency approximately twice as high as that of the H.264 coding scheme, is expected to be used in next-generation moving image digital appliances, and thus is likely to be widely used in the future.
As an encoding tool that is newly employed in the HEVC coding scheme, there is a technique called an adaptive offset process (SAO: Sample Adaptive Offset). The adaptive offset process is performed on a decoded image that has undergone deblocking filtering, and contributes to achieving higher image quality in the HEVC coding scheme (Japanese Patent Laid-Open No. 2012-5113).
The adaptive offset process includes a band offset process and an edge offset process. At the time of encoding, an encoding apparatus determines which one of the band offset process and the edge offset process is to be performed, or determines none of them is to be performed, per a CTU (Coding Tree Unit). The encoding apparatus determines a band position and an offset value if it is determined that the band offset process is to be performed, or an edge direction and an offset value if it is determined that the edge offset process is to be performed, and performs encoding of these parameters.
When determining parameters of the adaptive offset process at the time of encoding, a process for checking the band position or the edge direction on a pixel-by-pixel basis and calculating an appropriate offset value is performed. Accordingly, a problem arises in that a significant amount of processing is required to perform such process on all patterns of the adaptive offset process to calculate an evaluation value corresponding to each pattern and determine the final parameters to be employed based on the evaluation values.